<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-15">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm" method="post" enctype="multipart/form-data" action="/system/loanProduct/upload">
							<input id="id" name="id" th:value="${loanShop.id}"  type="hidden">
							<div class="form-group">
								<label class="col-sm-2 control-label">征信授权合同：</label>
								&nbsp;<span style="color:#0006ff;text-align:center">
								【备注：身份证标识:<span style="color:red">&nbsp;AAAAA&nbsp;</span>,
								姓名:<span style="color:red">&nbsp;BBBBB&nbsp;</span>,
								手机号:<span style="color:red">&nbsp;CCCCC&nbsp;</span>,
								时间:<span style="color:red">&nbsp;DDDDD&nbsp;</span>,
								地址:<span style="color:red">&nbsp;EEEEE&nbsp;</span>】</span>
								<input id="remark6" name="remark6" type="hidden" th:value="${loanShop.remark6}">
								<div class="col-sm-10">
									<div class="ibox-content no-padding">
										<div id="content_sn" class="summernote"></div>
									</div>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="button" class="btn btn-primary" onclick="update()">保存</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/jquery.form.js"></script>

	<script type="text/javascript">
        function update() {
            var content_sn = $("#content_sn").summernote('code');
            $("#remark6").val(content_sn);
            $.ajax({
                cache : true,
                type : "POST",
                url : "/system/loanShop/update",
                data : $('#signupForm').serialize(),// 你的formid
                async : false,
                error : function(request) {
                    parent.layer.alert("Connection error");
                },
                success : function(data) {
                    if (data.code == 0) {
                        parent.layer.msg("操作成功");
                        parent.reLoad();
                        var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
                        parent.layer.close(index);

                    } else {
                        parent.layer.alert(data.msg)
                    }

                }
            });

        }
        $().ready(function() {
            $('.summernote').summernote({
                height : '220px',
                lang : 'zh-CN',
                callbacks: {
                    onImageUpload: function(files, editor, $editable) {
                        console.log("onImageUpload");
                        sendFile(files);
                    }
                }
            });
            var contract = $("#remark6").val();
            $('#content_sn').summernote('code', contract);
        });
	</script>
</body>
</html>
